package redis.event;

import org.springframework.boot.context.properties.ConfigurationProperties;

@ConfigurationProperties(prefix = "spring.redis.event.key-expire")
public class RedisListenerProperties {

    /**
     * 是否启动键失效监听，默认false
     */
    private Boolean enabled = true;
    /**
     * 监听的核心线程数
     */
    private int corePoolSize = 3;
    /**
     * 最大线程数
     */
    private int maxPoolSize = 7;
    /**
     * 队列容量
     */
    private int queueCapacity = 100;
    /**
     * 保持激活状态时长(秒)
     */
    private int keepAliveSeconds = 60;
    /**
     * 线程名称前缀
     */
    private String threadNamePrefix = "yfjr-redis-key-expire-task";

    public Boolean getEnabled() {
        return enabled;
    }

    public void setEnabled(Boolean enabled) {
        this.enabled = enabled;
    }

    public int getCorePoolSize() {
        return corePoolSize;
    }

    public void setCorePoolSize(int corePoolSize) {
        this.corePoolSize = corePoolSize;
    }

    public int getMaxPoolSize() {
        return maxPoolSize;
    }

    public void setMaxPoolSize(int maxPoolSize) {
        this.maxPoolSize = maxPoolSize;
    }

    public int getQueueCapacity() {
        return queueCapacity;
    }

    public void setQueueCapacity(int queueCapacity) {
        this.queueCapacity = queueCapacity;
    }

    public int getKeepAliveSeconds() {
        return keepAliveSeconds;
    }

    public void setKeepAliveSeconds(int keepAliveSeconds) {
        this.keepAliveSeconds = keepAliveSeconds;
    }

    public String getThreadNamePrefix() {
        return threadNamePrefix;
    }

    public void setThreadNamePrefix(String threadNamePrefix) {
        this.threadNamePrefix = threadNamePrefix;
    }
}
